Skip to content

fix(resolution): resolve ES imports targeting .xsjs/.xsjslib files (#556)#594

Open
maxmilian wants to merge 1 commit into
colbymchenry:mainfrom
maxmilian:fix/556-sap-xsjs-extension
Open

fix(resolution): resolve ES imports targeting .xsjs/.xsjslib files (#556)#594
maxmilian wants to merge 1 commit into
colbymchenry:mainfrom
maxmilian:fix/556-sap-xsjs-extension

Conversation

@maxmilian

@maxmilian maxmilian commented May 31, 2026

Copy link
Copy Markdown
Contributor

What changed

The headline of #556 — indexing SAP HANA .xsjs / .xsjslib files as JavaScript — already shipped on main via #654 (the extension map + detection + extraction tests, credited to #556). This PR has been rebased and slimmed to the one piece #654 did not cover: import resolution.

Remaining gap

EXTENSION_RESOLUTION.javascript in src/resolution/import-resolver.ts did not list .xsjs / .xsjslib, so an extensionless ES import from an xsjs file —

// service.xsjs
import { buildQuery } from "./helpers";   // -> helpers.xsjslib

resolved to nothing. The cross-file call edge was dropped, so codegraph_callers / codegraph_impact reported the imported symbol as having no callers even though the import is live.

Fix

Add .xsjs, .xsjslib to the javascript entry in EXTENSION_RESOLUTION (one line). Now ./helpers resolves to helpers.xsjslib and the call edge is created.

Tests

Scope

Resolution only. The grammar/extension map is untouched here since #654 owns it now.

@maxmilian maxmilian force-pushed the fix/556-sap-xsjs-extension branch 3 times, most recently from 1564c6a to b31c3f0 Compare June 3, 2026 16:15
@maxmilian maxmilian changed the title feat(extraction): index SAP HANA .xsjs/.xsjslib as JavaScript (#556) fix(resolution): resolve ES imports targeting .xsjs/.xsjslib files (#556) Jun 3, 2026
@maxmilian maxmilian force-pushed the fix/556-sap-xsjs-extension branch from b31c3f0 to db95d38 Compare June 10, 2026 15:15
…olbymchenry#556)

The extraction half of colbymchenry#556 — indexing `.xsjs` / `.xsjslib` as JavaScript — already
landed on main via colbymchenry#654. This PR is now scoped to the remaining resolution gap:
the JS import-resolution list did not include the SAP HANA extensions, so an
extensionless `import { x } from './helpers'` in a `.xsjs` file resolved to
nothing and the cross-file call edge was dropped.

Add `.xsjs` / `.xsjslib` to the `javascript` entry in EXTENSION_RESOLUTION so
those imports resolve to their target file and `codegraph_callers` /
`codegraph_impact` see the edge. One resolution test covers the .xsjs -> .xsjslib
import; the now-redundant extraction/detection tests were dropped (covered by colbymchenry#654).
@maxmilian maxmilian force-pushed the fix/556-sap-xsjs-extension branch from db95d38 to 9ad4224 Compare June 12, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant